<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.10.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SimpleWindow: MonthCalendar.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">SimpleWindow
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.10.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('_month_calendar_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="headertitle"><div class="title">MonthCalendar.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span> </div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="preprocessor">#include &quot;Control.h&quot;</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="preprocessor">#include &lt;CommCtrl.h&gt;</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span> </div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="keyword">namespace </span>sw</div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span>{</div>
<div class="foldopen" id="foldopen00011" data-start="{" data-end="};">
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"><a class="line" href="classsw_1_1_month_calendar.html">   11</a></span>    <span class="keyword">class </span><a class="code hl_class" href="classsw_1_1_month_calendar.html">MonthCalendar</a> : <span class="keyword">public</span> <a class="code hl_class" href="classsw_1_1_control.html">Control</a></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span>    {</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span>    <span class="keyword">public</span>:</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"><a class="line" href="classsw_1_1_month_calendar.html#a0882a0fca2d2a8c4b5c719fd896f3576">   17</a></span>        <span class="keyword">const</span> <a class="code hl_class" href="classsw_1_1_dictionary.html">Property&lt;bool&gt;</a> <a class="code hl_variable" href="classsw_1_1_month_calendar.html#a0882a0fca2d2a8c4b5c719fd896f3576">ShowToday</a>;</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span> </div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span>    <span class="keyword">public</span>:</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="classsw_1_1_month_calendar.html#a0ea779945c5838f27137cdd39894a143">   23</a></span>        <a class="code hl_function" href="classsw_1_1_month_calendar.html#a0ea779945c5838f27137cdd39894a143">MonthCalendar</a>();</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"><a class="line" href="classsw_1_1_month_calendar.html#a27e71bfd28f2ab4da69b73507d8e2133">   30</a></span>        <span class="keywordtype">bool</span> <a class="code hl_function" href="classsw_1_1_month_calendar.html#a27e71bfd28f2ab4da69b73507d8e2133">GetToday</a>(<a class="code hl_class" href="classsw_1_1_dictionary.html">SYSTEMTIME</a> &amp;<a class="code hl_class" href="classsw_1_1_dictionary.html">out</a>);</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span> </div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"><a class="line" href="classsw_1_1_month_calendar.html#a529242b38bc049b66b568e09d2a228e0">   37</a></span>        <span class="keywordtype">bool</span> <a class="code hl_function" href="classsw_1_1_month_calendar.html#a529242b38bc049b66b568e09d2a228e0">SetToday</a>(<span class="keyword">const</span> <a class="code hl_class" href="classsw_1_1_dictionary.html">SYSTEMTIME</a> &amp;<a class="code hl_class" href="classsw_1_1_dictionary.html">today</a>);</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span> </div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"><a class="line" href="classsw_1_1_month_calendar.html#aeac33bf939d465e37752dce603f926d5">   44</a></span>        <span class="keywordtype">bool</span> <a class="code hl_function" href="classsw_1_1_month_calendar.html#aeac33bf939d465e37752dce603f926d5">GetTime</a>(<a class="code hl_class" href="classsw_1_1_dictionary.html">SYSTEMTIME</a> &amp;<a class="code hl_class" href="classsw_1_1_dictionary.html">out</a>);</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span> </div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"><a class="line" href="classsw_1_1_month_calendar.html#aaad4d350fd1f66ddbf95f2f9a70024f6">   51</a></span>        <span class="keywordtype">bool</span> <a class="code hl_function" href="classsw_1_1_month_calendar.html#aaad4d350fd1f66ddbf95f2f9a70024f6">SetTime</a>(<span class="keyword">const</span> <a class="code hl_class" href="classsw_1_1_dictionary.html">SYSTEMTIME</a> &amp;time);</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span> </div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"><a class="line" href="classsw_1_1_month_calendar.html#ac101b69ac321b4f21e9e9867135c8512">   59</a></span>        <span class="keywordtype">bool</span> <a class="code hl_function" href="classsw_1_1_month_calendar.html#ac101b69ac321b4f21e9e9867135c8512">SetRange</a>(<span class="keyword">const</span> <a class="code hl_class" href="classsw_1_1_dictionary.html">SYSTEMTIME</a> &amp;<a class="code hl_class" href="classsw_1_1_dictionary.html">minTime</a>, <span class="keyword">const</span> <a class="code hl_class" href="classsw_1_1_dictionary.html">SYSTEMTIME</a> &amp;<a class="code hl_class" href="classsw_1_1_dictionary.html">maxTime</a>);</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span> </div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span>    <span class="keyword">protected</span>:</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"><a class="line" href="classsw_1_1_month_calendar.html#ab5ca0c5ed05d9f4796a8fc8c089c2a21">   65</a></span>        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classsw_1_1_month_calendar.html#ab5ca0c5ed05d9f4796a8fc8c089c2a21">OnDrawFocusRect</a>() <span class="keyword">override</span>;</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span> </div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"><a class="line" href="classsw_1_1_month_calendar.html#a2422390122597047226c500dc896f7cb">   72</a></span>        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classsw_1_1_month_calendar.html#a2422390122597047226c500dc896f7cb">SetBackColor</a>(<a class="code hl_struct" href="structsw_1_1_color.html">Color</a> <a class="code hl_class" href="classsw_1_1_dictionary.html">color</a>, <span class="keywordtype">bool</span> <a class="code hl_class" href="classsw_1_1_dictionary.html">redraw</a>) <span class="keyword">override</span>;</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span> </div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"><a class="line" href="classsw_1_1_month_calendar.html#ac735773615992feb4f3394a7d361a8c1">   79</a></span>        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classsw_1_1_month_calendar.html#ac735773615992feb4f3394a7d361a8c1">SetTextColor</a>(<a class="code hl_struct" href="structsw_1_1_color.html">Color</a> <a class="code hl_class" href="classsw_1_1_dictionary.html">color</a>, <span class="keywordtype">bool</span> <a class="code hl_class" href="classsw_1_1_dictionary.html">redraw</a>) <span class="keyword">override</span>;</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno">   80</span> </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"><a class="line" href="classsw_1_1_month_calendar.html#a0276dd32163b585b0903c92186ae3e9c">   84</a></span>        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classsw_1_1_month_calendar.html#a0276dd32163b585b0903c92186ae3e9c">OnNotified</a>(<a class="code hl_class" href="classsw_1_1_dictionary.html">NMHDR</a> *<a class="code hl_class" href="classsw_1_1_dictionary.html">pNMHDR</a>) <span class="keyword">override</span>;</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno">   85</span> </div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"><a class="line" href="classsw_1_1_month_calendar.html#a4e5c2c34e0e552166fa5bb9a5b17b3df">   90</a></span>        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classsw_1_1_month_calendar.html#a4e5c2c34e0e552166fa5bb9a5b17b3df">OnTimeChanged</a>(<a class="code hl_class" href="classsw_1_1_dictionary.html">NMSELCHANGE</a> *<a class="code hl_class" href="classsw_1_1_dictionary.html">pInfo</a>);</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span>    };</div>
</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span>}</div>
<div class="ttc" id="aclasssw_1_1_control_html"><div class="ttname"><a href="classsw_1_1_control.html">sw::Control</a></div><div class="ttdoc">控件</div><div class="ttdef"><b>Definition</b> Control.h:11</div></div>
<div class="ttc" id="aclasssw_1_1_dictionary_html"><div class="ttname"><a href="classsw_1_1_dictionary.html">sw::Dictionary</a></div><div class="ttdoc">字典类，内部维护了一个指向std::map的智能指针</div><div class="ttdef"><b>Definition</b> Dictionary.h:24</div></div>
<div class="ttc" id="aclasssw_1_1_month_calendar_html"><div class="ttname"><a href="classsw_1_1_month_calendar.html">sw::MonthCalendar</a></div><div class="ttdoc">月历控件</div><div class="ttdef"><b>Definition</b> MonthCalendar.h:12</div></div>
<div class="ttc" id="aclasssw_1_1_month_calendar_html_a0276dd32163b585b0903c92186ae3e9c"><div class="ttname"><a href="classsw_1_1_month_calendar.html#a0276dd32163b585b0903c92186ae3e9c">sw::MonthCalendar::OnNotified</a></div><div class="ttdeci">virtual void OnNotified(NMHDR *pNMHDR) override</div><div class="ttdoc">父窗口接收到WM_NOTIFY后调用发出通知控件的该函数</div></div>
<div class="ttc" id="aclasssw_1_1_month_calendar_html_a0882a0fca2d2a8c4b5c719fd896f3576"><div class="ttname"><a href="classsw_1_1_month_calendar.html#a0882a0fca2d2a8c4b5c719fd896f3576">sw::MonthCalendar::ShowToday</a></div><div class="ttdeci">const Property&lt; bool &gt; ShowToday</div><div class="ttdoc">是否显示当前日期</div><div class="ttdef"><b>Definition</b> MonthCalendar.h:17</div></div>
<div class="ttc" id="aclasssw_1_1_month_calendar_html_a0ea779945c5838f27137cdd39894a143"><div class="ttname"><a href="classsw_1_1_month_calendar.html#a0ea779945c5838f27137cdd39894a143">sw::MonthCalendar::MonthCalendar</a></div><div class="ttdeci">MonthCalendar()</div><div class="ttdoc">初始化月历控件</div></div>
<div class="ttc" id="aclasssw_1_1_month_calendar_html_a2422390122597047226c500dc896f7cb"><div class="ttname"><a href="classsw_1_1_month_calendar.html#a2422390122597047226c500dc896f7cb">sw::MonthCalendar::SetBackColor</a></div><div class="ttdeci">virtual void SetBackColor(Color color, bool redraw) override</div><div class="ttdoc">设置背景颜色</div></div>
<div class="ttc" id="aclasssw_1_1_month_calendar_html_a27e71bfd28f2ab4da69b73507d8e2133"><div class="ttname"><a href="classsw_1_1_month_calendar.html#a27e71bfd28f2ab4da69b73507d8e2133">sw::MonthCalendar::GetToday</a></div><div class="ttdeci">bool GetToday(SYSTEMTIME &amp;out)</div><div class="ttdoc">获取当前控件的“今天”部分所表示的时间</div></div>
<div class="ttc" id="aclasssw_1_1_month_calendar_html_a4e5c2c34e0e552166fa5bb9a5b17b3df"><div class="ttname"><a href="classsw_1_1_month_calendar.html#a4e5c2c34e0e552166fa5bb9a5b17b3df">sw::MonthCalendar::OnTimeChanged</a></div><div class="ttdeci">virtual void OnTimeChanged(NMSELCHANGE *pInfo)</div><div class="ttdoc">当前控件表示的时间改变时调用该函数</div></div>
<div class="ttc" id="aclasssw_1_1_month_calendar_html_a529242b38bc049b66b568e09d2a228e0"><div class="ttname"><a href="classsw_1_1_month_calendar.html#a529242b38bc049b66b568e09d2a228e0">sw::MonthCalendar::SetToday</a></div><div class="ttdeci">bool SetToday(const SYSTEMTIME &amp;today)</div><div class="ttdoc">设置当前控件的“今天”部分所表示的时间</div></div>
<div class="ttc" id="aclasssw_1_1_month_calendar_html_aaad4d350fd1f66ddbf95f2f9a70024f6"><div class="ttname"><a href="classsw_1_1_month_calendar.html#aaad4d350fd1f66ddbf95f2f9a70024f6">sw::MonthCalendar::SetTime</a></div><div class="ttdeci">bool SetTime(const SYSTEMTIME &amp;time)</div><div class="ttdoc">设置当前控件表示的时间</div></div>
<div class="ttc" id="aclasssw_1_1_month_calendar_html_ab5ca0c5ed05d9f4796a8fc8c089c2a21"><div class="ttname"><a href="classsw_1_1_month_calendar.html#ab5ca0c5ed05d9f4796a8fc8c089c2a21">sw::MonthCalendar::OnDrawFocusRect</a></div><div class="ttdeci">virtual void OnDrawFocusRect() override</div><div class="ttdoc">绘制虚线框时调用该函数</div></div>
<div class="ttc" id="aclasssw_1_1_month_calendar_html_ac101b69ac321b4f21e9e9867135c8512"><div class="ttname"><a href="classsw_1_1_month_calendar.html#ac101b69ac321b4f21e9e9867135c8512">sw::MonthCalendar::SetRange</a></div><div class="ttdeci">bool SetRange(const SYSTEMTIME &amp;minTime, const SYSTEMTIME &amp;maxTime)</div><div class="ttdoc">设置可选的时间段</div></div>
<div class="ttc" id="aclasssw_1_1_month_calendar_html_ac735773615992feb4f3394a7d361a8c1"><div class="ttname"><a href="classsw_1_1_month_calendar.html#ac735773615992feb4f3394a7d361a8c1">sw::MonthCalendar::SetTextColor</a></div><div class="ttdeci">virtual void SetTextColor(Color color, bool redraw) override</div><div class="ttdoc">设置文本颜色</div></div>
<div class="ttc" id="aclasssw_1_1_month_calendar_html_aeac33bf939d465e37752dce603f926d5"><div class="ttname"><a href="classsw_1_1_month_calendar.html#aeac33bf939d465e37752dce603f926d5">sw::MonthCalendar::GetTime</a></div><div class="ttdeci">bool GetTime(SYSTEMTIME &amp;out)</div><div class="ttdoc">获取当前控件表示的时间</div></div>
<div class="ttc" id="astructsw_1_1_color_html"><div class="ttname"><a href="structsw_1_1_color.html">sw::Color</a></div><div class="ttdoc">颜色</div><div class="ttdef"><b>Definition</b> Color.h:12</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_01fcd3835fb4e7d9331b722d86291b65.html">sw</a></li><li class="navelem"><a class="el" href="dir_ed5f6ece24ffcc4307a76d27c2494db3.html">inc</a></li><li class="navelem"><b>MonthCalendar.h</b></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.10.0 </li>
  </ul>
</div>
</body>
</html>
